package com.zx.map.dao.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.DataAccessException;
import org.springframework.stereotype.Component;
import com.zx.map.dao.ProductDao;
import com.zx.map.dao.mapper.ProductMapper;
import com.zx.map.dao.model.Product;
import com.zx.map.dao.model.ProductExample;

@Component("productDao")
public class ProductImpl implements ProductDao {

    @Autowired
    private ProductMapper mapper;
    
    /** 
     * 查找列表
     */
	@Override
	public List<Product> getListByExample(ProductExample example)
			throws DataAccessException {
		return mapper.selectByExample(example);
	}

    /**
     * 根据代理商编号获取代理商信息
     */
    public Product selectByPrimaryKey(long key) throws DataAccessException {
        return mapper.selectByPrimaryKey(key);
    }
    
}
